package com.example.springboot.controller.asm;

import com.example.springboot.utils.Calculate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * 由于定义了controller的aop，导致是代理对象调用无法显示结果
 * 如果需要看到测试效果，需要将aopController不注入容器
 *
 * @Author:ChenZhangKun
 * @Date: 2021/9/9 21:29
 */
@RequestMapping("/asm")
@RestController
public class AsmController {
    @GetMapping("/time")
    public Date countTime() throws InterruptedException {
        Calculate.sleep();
        return new Date();
    }
}
